﻿var express = require('express');
var app = express();
var http = require('http').Server(app);
var httpget = require('http');
//var bodyParser = require('body-parser');
var session = require('express-session');

//var rw = require('./config.js');

//在线
//app.use(bodyParser.urlencoded({ extended: false }))
//app.use(bodyParser.json());

app.use(session({
    secret: 'secret',
    resave: true,// don't save session if unmodified
    saveUninitialized: false,// don't create session until something stored
    cookie: {
        maxAge: 1000 * 60 * 10 //过期时间设置(单位毫秒)
    }
}));


app.use(express.static(__dirname));

 app.get("/",function(req,res){
     
     res.send("{ret:ok}");
 });

http.listen(8000, function () {
    console.log('listening on *:8000');
});

